Euclidean algorithm with example